/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Engine2D.graphics.animation;

import Engine2D.graphics.GLSpriteSheet;
import Engine2D.graphics.GLImage;
import java.awt.Dimension;

/**
 *
 * @author Garys
 */
public class Frame {

    private GLSpriteSheet image = null;
    private Dimension padding = null;
    private float u, v;
    private int imageX, imageY;

    /**
     * 
     * @param image
     * @param imageX
     * @param imageY
     * @param u
     * @param v
     * @param w
     * @param h
     */
    public Frame(GLSpriteSheet image, int imageX, int imageY, float u, float v, int w, int h) {
        this.image = image;
        padding = new Dimension(w,h);
        this.u = u;
        this.v = v;
        this.imageX = imageX;
        this.imageY = imageY;
    }

    /**
     * 
     * @param instance
     * @param gLSpriteSheet
     * @param f
     * @param f0
     * @param i
     * @param i0
     */
    public Frame(GLSpriteSheet instance, GLSpriteSheet gLSpriteSheet, float f, float f0, int i, int i0) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    /**
     * 
     * @param x
     * @param y
     */
    public void render(int x, int y) {
        
        image.draw(x - padding.width, y - padding.height, imageX, imageY,u,v, 1f);
    }
}